import axios from '../AxiosConfig.js'

export const dictIndex = (name, page) => {
    return axios({
        method: 'get',
        url: '/api/manage/dict/index',
        params: {
            "name": name,
            "page": page.page,
            "size": page.size
        }
    })
}


export const createDict = data => {
    return axios({
        method: 'post',
        url: '/api/manage/dict',
        data: data
    })
}

export const deleteDict = ukId => {
    return axios({
        method: 'delete',
        url: '/api/manage/dict',
        params: {"ukId": ukId}
    })
}

export const updateDict = data => {
    return axios({
        method: 'put',
        url: '/api/manage/dict',
        data: data
    })
}

export const selectDict = (ukId) => {
    return axios({
        method: 'get',
        url: '/api/manage/dict',
        params: {"ukId": ukId}
    })
}

export const listDict = (name) => {
    return axios({
        method: 'get',
        url: '/api/manage/dict/list',
        params: {"name": name}
    })
}

export const listDictDetails = (name) => {
    return axios({
        method: 'get',
        url: '/api/manage/dict/details/list',
        params: {"name": name}
    })
}


